package com.starlink.model.util;

import com.starlink.model.dtomapper.StarNurturingDtoMapper;
import com.starlink.model.domain.StarNurturingDO;
import com.starlink.model.vo.StarNurturingVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class StarNurturingConvert {

    public static List<StarNurturingVO> buildStarNurturingVoList(List<StarNurturingDO> starNurturingDOList) {
        if (CollectionUtils.isEmpty(starNurturingDOList)) {
            return Lists.newArrayList();
        }
        List<StarNurturingVO> starNurturingVOList = new ArrayList<>();
        for (StarNurturingDO starNurturingDO : starNurturingDOList) {
            starNurturingVOList.add(StarNurturingDtoMapper.INSTANCE.do2VO(starNurturingDO));
        }

        return starNurturingVOList;
    }
}
